package com.qczl.pme.service.impl;

import java.util.ArrayList;
import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.qczl.pme.dao.UserMapper;
import com.qczl.pme.pojo.User;
import com.qczl.pme.service.UserService;

/**
 * 用户业务层实现类
 * @author SongR
 *
 */
@Service	
public class UserServiceImpl implements UserService{

	
	@Resource
	UserMapper udao ;
	/**
	 * 实现用户登录
	 */
	public User login(User u) throws Exception {
		List<User> us = new ArrayList<User>();
		User user = null;
		if(null!=u){
			us = udao.select(u);
			if(us.size()>0){
				user=us.get(0);
			}
		}
		return user;
	}
}
